import ApiInfo from "@/api";
import ButtonInfo from "../button/ButtonInfo";
import TableContent from "./TableContent";
import { StateInfo } from "../StateInfo";

// list表信息
export default class TableListPageInfo {

    page: number;

    limit: number;

    total: number;


    buttonList: Array<ButtonInfo>;

    tableContent: TableContent;

    constructor(buttonList: Array<ButtonInfo>, tableContent: TableContent) {
        this.buttonList = buttonList || 'default';
        this.tableContent = tableContent || 'default';
        this.page = 1;
        this.limit = 20;
        this.total = 100;
    }

    onCurrentChange = (val: number) => {
    }

    onSizeChange = (val: number) => {
    }

    onState = (headCode: string, data: any): StateInfo => {
        const info = new StateInfo();
        info.type = "danger";
        info.data = '未知';
        if (headCode == null || data == null) {
            return info;
        }
        return info;
    }


}